What is the advantage of not running as root? [closed]
Posted
by
Shmuel Brill
on Server Fault
See other posts from Server Fault
or by Shmuel Brill
Published on 2012-04-04T03:17:41Z
Indexed on
2012/04/04
5:31 UTC
Read the original article
Hit count: 550
linux
|user-permissions
Possible Duplicate:
What's wrong with always being root?
All modern brands of Linux highly discourage (or disable) one from running as root instead of a normal user.
I do not understand why.
As a "normal" user, one could
- Download a rouge program from the internet.
- Run it (After all, one isn't root, what can it do).
- It installs itself in .bashrc or .xinitrc
- It writes a rouge "sudo" and "su" and adds . to the path
- Not noticing that . is in path, one runs sudo.
- The rouge program now has root password and can do anything it wants in the system.
Even if 3-6 doesn't happen, the program could still
- Be part of a botnet.
- Read all files in the home directory and send them back (mine for SS#, Credit Card numbers, bank account numbers, etc).
- Send spam.
- Run a backdoor server to allow an attacker a chance to connect to the machine to determine vulnerabilities.
It seems that the whole "permissions" thing (root/non-root) is just to prevent amateur crackers from getting into the system, so the question is:
Is there a point in avoiding running as root, and is there a way to protect oneself if one wants to run unsafe code?
© Server Fault or respective owner